Declare Function GetWindowsDirectory Lib "Kernel" (ByVal lpBuffer As String, ByVal nSize As Integer) As Integer
Declare Function WritePrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lplFileName As String) As Integer
Declare Function WriteProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any) As Integer
Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpAppName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
Declare Function GetProfileString Lib "Kernel" (ByVal lpAppName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer) As Integer
Dim lpReturnString As String * 80
Dim windir As String * 144
Dim newpaper As String * 12
Dim oldwallpaper, bmpfile, bmplist, windir2, windir3 As String
Dim tilecheck, p As Integer
Sub Form_Load ()
timer1.Interval = 0
timer2.Interval = 0
timer3.Interval = 0
n = GetWindowsDirectory(windir, 144)
windir2 = Left$(windir, n)
windir3 = windir2 + "\"
ChDir windir2
bmplist = windir3 + "bmps.lst"
bmpfile = windir3 + "bmps.zip"
file1.Path = windir2
n = GetProfileString("Desktop", "wallpaper", "", lpReturnString, 80)